package com.shuda.business.engine.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 撞库检测配置实体类
 * 用于存储撞库检测配置信息
 * 
 * @author ink
 * @Description: 撞库检测配置实体
 * @date 2024-10-10 14:55:00
 */
@Data
@TableName("collision_check_config")
@Schema(name = "CollisionCheckEntity", description = "撞库检测配置实体")
public class CollisionCheckEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "配置名称")
    private String configName;

    @Schema(description = "检测字段")
    private String checkField;

    @Schema(description = "检测规则(JSON格式存储)")
    private String checkRule;

    @Schema(description = "匹配阈值")
    private Double matchThreshold;

    @Schema(description = "处理方式(allow-允许,reject-拒绝,review-人工审核)")
    private String handleType;

    @Schema(description = "状态(enabled-启用,disabled-禁用)")
    private String status;

    @Schema(description = "描述信息")
    private String description;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "删除标记(0-正常,1-删除)")
    private Integer deleted;

}